<template>
  <van-row>
    <van-row>
      <van-col :span="24">
        <van-nav-bar left-text="返回" left-arrow @click-left="onClickLeft" :title="title">
        </van-nav-bar>
      </van-col>
    </van-row>
    <van-row>
      <van-col :span="24">
        <task-list changeTab="user" :type="$route.params.type">

        </task-list>
      </van-col>
    </van-row>
  </van-row>

</template>

<script>
  import {
    Row,
    Col,
    NavBar
  } from 'vant';
  export default {
    name: "mytaskdetail",
    props: {},
    data: function () {
      return {
        title: '', //标题
      }
    },
    components: {
      'van-row': Row,
      'van-col': Col,
      'task-list': () => import('@/views/tasklist'),
      'van-nav-bar': NavBar
    },
    methods: {
      onClickLeft() {
        this.$router.replace('/user');
      }
    },
    mounted() {
      //设置标题
      this.title = this.$route.params.type == 1 ? '我的任务' : '指派给我'
    }
  }

</script>
